package com.financing.wap.dao.impl;

import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.IManagerOrderDao;
import com.financing.wap.dto.FpManagerOrder;
import com.financing.wap.dto.ManagerOrderDTO;
import com.financing.wap.dto.ManagerOrderHistoryDTO;

@Repository
public class ManagerOrderDaoImpl extends BaseDaoImpl<FpManagerOrder, Integer> implements IManagerOrderDao {

	@SuppressWarnings("deprecation")
	@Override
	public FpManagerOrder queryManagerOrderByOid(Integer oId) {
		return (FpManagerOrder) this.getSqlMapClientTemplate().queryForObject(SqlName.queryManagerOrderByOid, oId);
	}

	@Override
	public Class<FpManagerOrder> getEntityClass() {
		return FpManagerOrder.class;
	}

	@SuppressWarnings("deprecation")
	@Override
	public int addManagerOrderUser(ManagerOrderDTO managerOrder) {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.addManagerOrderUser, managerOrder);
	}

	@SuppressWarnings("deprecation")
	@Override
	public int addManagerOrderUserHistory(ManagerOrderHistoryDTO managerOrderHistory) {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.addManagerOrderUserHistory, managerOrderHistory);
	}
}
